﻿using System;
using System.Collections.Generic;

namespace Faz.SideWinderSC.Client
{
    internal static class CollectionExtensions
    {
        public static void Copy<T>(this ICollection<T> source, ICollection<T> destination)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (destination == null)
            {
                throw new ArgumentNullException("destination");
            }

            destination.Clear();
            foreach (var value in source)
            {
                destination.Add(value);
            }
        }
    }
}
